<!doctype html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script src="../../assert_selection.js"></script>
<script>
selection_test(
  '<div contenteditable dir="rtl">|they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'forward', 'character'),
  '<div contenteditable dir="rtl">^t|hey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-0 rtl forward character');

selection_test(
  '<div contenteditable dir="rtl">t|hey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'forward', 'character'),
  '<div contenteditable dir="rtl">t^h|ey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-1 rtl forward character');

selection_test(
  '<div contenteditable dir="rtl">th|ey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'forward', 'character'),
  '<div contenteditable dir="rtl">th^e|y said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-2 rtl forward character');

selection_test(
  '<div contenteditable dir="rtl">the|y said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'forward', 'character'),
  '<div contenteditable dir="rtl">the^y| said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-3 rtl forward character');

selection_test(
  '<div contenteditable dir="rtl">they| said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'forward', 'character'),
  '<div contenteditable dir="rtl">they^ |said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-4 rtl forward character');

selection_test(
  '<div contenteditable dir="rtl">they |said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'forward', 'character'),
  '<div contenteditable dir="rtl">they ^s|aid "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-5 rtl forward character');

selection_test(
  '<div contenteditable dir="rtl">they s|aid "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'forward', 'character'),
  '<div contenteditable dir="rtl">they s^a|id "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-6 rtl forward character');

selection_test(
  '<div contenteditable dir="rtl">they sa|id "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'forward', 'character'),
  '<div contenteditable dir="rtl">they sa^i|d "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-7 rtl forward character');

selection_test(
  '<div contenteditable dir="rtl">they sai|d "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'forward', 'character'),
  '<div contenteditable dir="rtl">they sai^d| "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-8 rtl forward character');

selection_test(
  '<div contenteditable dir="rtl">they said| "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'forward', 'character'),
  '<div contenteditable dir="rtl">they said^ |"\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-9 rtl forward character');

selection_test(
  '<div contenteditable dir="rtl">they said |"\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'forward', 'character'),
  '<div contenteditable dir="rtl">they said ^"|\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-10 rtl forward character');

selection_test(
  '<div contenteditable dir="rtl">they said "|\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'forward', 'character'),
  '<div contenteditable dir="rtl">they said "^\u202B|car \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-11 rtl forward character');

selection_test(
  '<div contenteditable dir="rtl">they said "\u202B|car \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'forward', 'character'),
  '<div contenteditable dir="rtl">they said "\u202B^c|ar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-12 rtl forward character');

selection_test(
  '<div contenteditable dir="rtl">they said "\u202Bc|ar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'forward', 'character'),
  '<div contenteditable dir="rtl">they said "\u202Bc^a|r \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-13 rtl forward character');

selection_test(
  '<div contenteditable dir="rtl">they said "\u202Bca|r \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'forward', 'character'),
  '<div contenteditable dir="rtl">they said "\u202Bca^r| \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-14 rtl forward character');

selection_test(
  '<div contenteditable dir="rtl">they said "\u202Bcar| \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'forward', 'character'),
  '<div contenteditable dir="rtl">they said "\u202Bcar^ |\u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-15 rtl forward character');

selection_test(
  '<div contenteditable dir="rtl">they said "\u202Bcar |\u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'forward', 'character'),
  '<div contenteditable dir="rtl">they said "\u202Bcar ^\u05D3|\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-16 rtl forward character');

selection_test(
  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3|\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'forward', 'character'),
  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3^\u05D4|\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  '18-17 rtl forward character');

selection_test(
  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4|\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'forward', 'character'),
  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4^\u05D5| \u05D0\u05D1\u05D2\u202C."</div>',
  '18-18 rtl forward character');

selection_test(
  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4\u05D5| \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'forward', 'character'),
  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4\u05D5^ |\u05D0\u05D1\u05D2\u202C."</div>',
  '18-19 rtl forward character');

selection_test(
  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4\u05D5 |\u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'forward', 'character'),
  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4\u05D5 ^\u05D0|\u05D1\u05D2\u202C."</div>',
  '18-20 rtl forward character');

selection_test(
  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0|\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'forward', 'character'),
  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0^\u05D1|\u05D2\u202C."</div>',
  '18-21 rtl forward character');

selection_test(
  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1|\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'forward', 'character'),
  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1^\u05D2|\u202C."</div>',
  '18-22 rtl forward character');

selection_test(
  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2|\u202C."</div>',
  selection => selection.modify('extend', 'forward', 'character'),
  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2^\u202C|."</div>',
  '18-23 rtl forward character');

selection_test(
  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C|."</div>',
  selection => selection.modify('extend', 'forward', 'character'),
  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C^.|"</div>',
  '18-24 rtl forward character');

selection_test(
  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C.|"</div>',
  selection => selection.modify('extend', 'forward', 'character'),
  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C.^"|</div>',
  '18-25 rtl forward character');
</script>
